Skip to content

Conversation

Collins-kariuk
Copy link

I would like to contribute to the TRIQS tutorial repository, an accompanying tutorial I wrote with the help of my mentors Olivier Gingras and Sophie Beck regarding my TB_to_sympy which returns the analytical form of the momentum space Hamiltonian of the tight-binding model from a tight-binding lattice object by utilizing the Fourier series.

This function has already been merged into TRIQS and can be found in the utils.py file. The tutorial provides the user with a brief introduction to the tight-binding model and enables the user to interact with different parameters of my function; as well as comparing minimal tight-binding models.

@Wentzell Wentzell requested a review from the-hampel September 29, 2023 16:47
@the-hampel the-hampel force-pushed the feature/SymPyfy-analytic-expresser branch from 4995b13 to 8040a7b Compare October 3, 2023 21:36
…escription:

- Introduced an example where I call sympyfy on a simple-structured Lathanum Cuprate material under different scenarios.
- Changed the introduction to include the fact that w90 includes all hopping parameters but that the user has the option of using PythTB to include cutoffs on the hopping amplitude and hopping distance.
- Made sure to highlight the fact that the numerical expression isn't wholly numerical but depends on the k-space vector variables.
… of the full vs cutoff model of the Lanthanum cuprate compound
So that I could import it into my tutorial.
@the-hampel the-hampel force-pushed the feature/SymPyfy-analytic-expresser branch from 8040a7b to 94bc592 Compare October 3, 2023 21:38
@Collins-kariuk
Copy link
Author

Hello @the-hampel. Thanks for approving my changes. Shall I close this PR? What is remaining?

@the-hampel
Copy link
Member

Hi @Collins-kariuk, @Wentzell will have a final look and than we will merge the tutorial. So please leave it open for now. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite correct? It does not generate a TB model, it takes a pre-constructed one. Also it could be obtained out of a Wannier90 calculation or could just be a model Hamiltonian.
The output is an analytic expression of that same TB model.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean 'a generic form of a TB Hamiltonian reads' ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would drop here the part ", which is achieved using the TB_to_sympy function."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to: 'The documentation of the TB_to_sympy function reads'

Also, why don't you use ?TB_to_sympy to generate documentation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also now used ?TB_to_sympy to generate documentation. Thank you for this. I did not know one could do this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TBL doesn't need to come out of a conversion, it can be directly defined.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not clear. You should state that the numerical expression is uses euclidian unit vectors and the analytical expression uses reciprocal basis vectors ai

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of object is w90_input here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a docstring to the minimal_model function to make it clear.

This was done after the whole rebasing fiasco. Hopefully, it didn't alter anything major. I had to delete the tutorial notebook first as I was rebasing which is why I am adding the tutorial wholly now.
@Collins-kariuk
Copy link
Author

Collins-kariuk commented Dec 22, 2023

Hello @Wentzell , I have implemented your proposed changes. They are visible in the Sympyfy analytic expresser branch. I am not sure whether I should open another pull request so I have not. If you need me to, I will. Let me know if there are other things I can do.

@Wentzell Wentzell force-pushed the unstable branch 3 times, most recently from bc45f69 to 53078bc Compare September 4, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants